import Vue from 'vue'
import VueRouter from 'vue-router'
//路由
import Home from '../views/home/Home.vue'

import Outback from '../views/outback/Outback.vue'
import Hang from '../views/hang/Hang.vue'
import Taiwan from '../views/taiwan/Taiwan.vue'
import Fremdness from '../views/fremdness/Fremdness.vue'
import MusicList from '../views/musiclist/MusicList.vue'
import Paly from '../views/paly/Paly.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: Home,
        children: [
            {
                path: '/',
                name: 'home',
                component: Outback,
                meta:{
                    tit:'内地'
                }
            },
            {
                path: '/hang',
                name: 'Hang',
                component: Hang,
                meta:{
                    tit:'香港'
                }
            },
            {
                path: '/taiwan',
                name: 'Taiwan',
                component: Taiwan,
                meta:{
                    tit:'台湾'
                }
            },{
                path: '/fremdness',
                name: 'Fremdness',
                component: Fremdness,
                meta:{
                    tit:'外国'
                }
            },{
                path: '/musiclist',
                name: 'musiclist',
                component: MusicList,
                meta:{
                    tit:'歌单'
                }
            },
            {
                path: '/paly:id',
                name: 'paly',
                component: Paly,
                meta:{
                    tit:'123456'
                }
            },
        ]
    },
    //   {
    //     path: '/about',
    //     name: 'about',
    //     // route level code-splitting
    //     // this generates a separate chunk (about.[hash].js) for this route
    //     // which is lazy-loaded when the route is visited.
    //     component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    //   }
]

const router = new VueRouter({
    routes
})

export default router
